package com.miao.websecurity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * 管理员与角色中间表(RoleAdmin)表实体类
 *
 * @author MiaoWenqing
 * @since 2021-01-16 15:41:07
 */
@SuppressWarnings("serial")
public class RoleAdmin extends Model<RoleAdmin> {
    //角色id
    @TableId(type = IdType.ASSIGN_UUID)
    private String roleId;
    //管理员id
    private String adminId;

    public RoleAdmin(String roleId, String adminId) {
        this.roleId = roleId;
        this.adminId = adminId;
    }

    public RoleAdmin() {
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getAdminId() {
        return adminId;
    }

    public void setAdminId(String adminId) {
        this.adminId = adminId;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.roleId;
    }
}